<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>箭头</title>
</head>
<body>

<canvas id="canvas" style="border:1px solid #aaa; display:block; margin:50px auto;">
	当前浏览器不支持canvas, 请更换浏览器后再试
</canvas>
<script>
	window.onload = function(){
		var canvas = document.getElementById("canvas");
		
		canvas.width = 800;
		canvas.height = 800;
		
		var context = canvas.getContext("2d");
		
		context.beginPath();
		context.moveTo( 100, 350);
		context.lineTo( 500, 350);
		context.lineTo( 500, 200);
		context.lineTo( 700, 400);
		context.lineTo( 500, 600);
		context.lineTo( 500, 450);
		context.lineTo( 100, 450);
		context.lineTo( 100, 350);
		context.closePath();
		
		context.linWidth = 10;

		context.strokeStyle = "blue";
		context.stroke();		

	}
</script>
</body>
</html>
